const    LOCAL=true
const   API_URI=LOCAL?'http://yapi.garychang.cn/mock/21':'http://game.pingxinghulian.com/rpAdmnApi/public/admin'
//const   API_URI='http://game.pingxinghulian.com/rpAdmnApi/public/admin'
const   VERSION='1.0.0'
function getTime(tiemstmap, type) {
    var date = new Date(tiemstmap * 1000)
    var month = date.getMonth()+1
    var day = date.getDate()
    var H=date.getHours()
    var M=date.getMinutes()
    var S=date.getSeconds()
    switch (type) {
    case 'Y':
        return date.getFullYear()
    case 'D':
        return  date.getFullYear() + '-' + (month >= 10 ? month : '0'.concat(month) )+ '-' +(day >= 10 ? day : '0'.concat(day))
    case 'S':
        H= (H >= 10 ?H : '0'.concat(H) )
        M= (M >= 10 ?M : '0'.concat(M) )
        S= (S >= 10 ?S : '0'.concat(S) )
        return date.getFullYear() + '-' + (month >= 10 ? month : '0'.concat(month) )+ '-' +(day >= 10 ? day : '0'.concat(day)) +' ' +(H)+':'+(M)+':'+(S)
    
    }
    return  date.getFullYear() + '-' + (month >= 10 ? month : '0'.concat(month) )+ '-' +(day >= 10 ? day : '0'.concat(day))
    
    
}
export  {API_URI,VERSION,getTime}
